import groovy.sql.Sql


def url = 'jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false'
def user = 'root'
def password = 'root'
def driver = 'com.mysql.jdbc.Driver'

def sql = Sql.newInstance(url, user, password, driver)

println sql.connection.catalog
